package com.starview.star.operators.string;

import com.starview.star.operators.Builtin;
import com.starview.star.operators.Intrinsics;
import com.starview.star.operators.string.runtime.String2Number.Hex2Integer;
import com.starview.star.operators.string.runtime.String2Number.Hex2Long;
import com.starview.star.operators.string.runtime.String2Number.String2Boolean;
import com.starview.star.operators.string.runtime.String2Number.String2Char;
import com.starview.star.operators.string.runtime.String2Number.String2Decimal;
import com.starview.star.operators.string.runtime.String2Number.String2Float;
import com.starview.star.operators.string.runtime.String2Number.String2Integer;
import com.starview.star.operators.string.runtime.String2Number.String2Long;

/**
 * The String2Number functions parse strings into different kinds of numbers.
 * 
 * This is the compile-time declarations of the functions
 * 
 * @author fgm
 * 
 */
public abstract class String2Number
{

  public static void declare(Intrinsics cxt)
  {
    cxt.declareBuiltin(new Builtin(String2Boolean.name, String2Boolean.type(), String2Boolean.class));
    cxt.declareBuiltin(new Builtin(String2Char.name, String2Char.type(), String2Char.class));
    cxt.declareBuiltin(new Builtin(String2Integer.name, String2Integer.type(), String2Integer.class));
    cxt.declareBuiltin(new Builtin(String2Long.name, String2Long.type(), String2Long.class));
    cxt.declareBuiltin(new Builtin(Hex2Integer.name, Hex2Integer.type(), Hex2Integer.class));
    cxt.declareBuiltin(new Builtin(Hex2Long.name, Hex2Long.type(), Hex2Long.class));
    cxt.declareBuiltin(new Builtin(String2Float.name, String2Float.type(), String2Float.class));
    cxt.declareBuiltin(new Builtin(String2Decimal.name, String2Decimal.type(), String2Decimal.class));
  }
}
